/* 书库页面特定样式 */

/* 图书馆主内容区域 */
.library-main {
    padding: 30px 40px;
    gap: 30px;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-options {
    display: flex;
    background: var(--button-bg);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--button-active);
    color: var(--text-primary);
}

/* 章节标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.see-all {
    color: var(--highlight-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.see-all:hover {
    opacity: 0.8;
}

/* 书籍网格 */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.book-item {
    position: relative;
    transition: transform 0.3s;
}

.book-item:hover {
    transform: translateY(-5px);
}

.book-cover {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    aspect-ratio: 2/3;
    margin-bottom: 10px;
    background-color: var(--card-bg);
    transition: transform 0.3s;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 进度条 */
.progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.3);
}

.progress-indicator .progress-bar {
    height: 100%;
    background-color: var(--highlight-color);
}

.book-percentage {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.book-type {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.book-info {
    text-align: center;
}

.book-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 新项目样式 */
.new-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 1.5rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
}

.new-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--highlight-color);
    color: var(--highlight-color);
}

/* 列表视图 */
.books-grid.list-view {
    grid-template-columns: 1fr;
    gap: 15px;
}

.books-grid.list-view .book-item {
    display: flex;
    align-items: center;
}

.books-grid.list-view .book-cover {
    width: 80px;
    height: 120px;
    margin-bottom: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.books-grid.list-view .book-info {
    text-align: left;
    flex: 1;
}

/* 收藏按钮样式 */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 2;
}

.book-cover:hover .favorite-btn {
    opacity: 1;
    transform: scale(1);
}

.favorite-btn i.fas {
    color: #ff375f;
}

.favorite-btn i.far {
    color: white;
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.favorite-btn:hover i.far {
    color: #ff375f;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .library-main {
        padding: 20px;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .favorite-btn {
        opacity: 1;
        transform: scale(1);
    }
} 